import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.12
Rectangle{

    property bool isFirst : false;


    anchors.bottom:  parent.bottom
    Layout.preferredHeight:(parent.height*0.6)
    color:"pink"

    Layout.fillWidth: true


    Loader {
           id: pageLoader
       }

       MouseArea {
           anchors.fill: parent
           onClicked: changePage();
       }

       function changePage() {
           if(isFirst) {
               pageLoader.source = "Page1.qml"
           } else {
               pageLoader.source = "Page2.qml"
           }
           isFirst = !isFirst;
       }


}
